import type { AppRouteModule } from '@/router/types';

import { getParentLayout, LAYOUT } from '@/router/constant';
import { t } from '@/hooks/web/useI18n';

const archive: AppRouteModule = {
  path: '/archive', //router路径
  name: 'Archive', //router name
  component: LAYOUT, //layout标识是顶层菜单
  redirect: '/archive/personinfo', //跳转路径
  meta: {
    orderNo: 4, //排序号，数字越靠前菜单考前
    icon: 'ion:md-archive', //icon图标
    title: t('routes.oper.archive.archive'), //标题，从locales/lang/zh-CN中找
  },
  //子菜单
  children: [
    {
      path: 'personinfo',
      name: 'PersonInfo',
      meta: {
        icon: 'material-symbols:person',
        title: t('routes.oper.archive.personinfo'),
      },
      component: () => import('@/views/archive/person-info/index.vue'), //手动录入
    },
    {
      path: 'examinfo',
      name: 'ExamInfo',
      meta: {
        icon: 'medical-icon:medical-records',
        title: t('routes.oper.archive.examinfo'),
      },
      component: () => import('@/views/archive/exam-info/index.vue'), //手动录入
    },
  ],
};

export default archive;
